<?php
	session_start();
	$captcha = imagecreatefrompng('button.png');
	$red	 = imagecolorallocate($captcha, 255, 0, 0);
	$font	 = 'arial.ttf';
	$str 	 = md5(microtime() * mktime());
	$substr	 = substr($str, 0, 5);
	
	$_SESSION['securitycode'] = $substr;
	
	imagettftext($captcha, 21,5, 25, 35, $red,$font, $substr);
	header('content-type: image/png');
	imagepng($captcha);
	imagedestroy($captcha);
?>
